package com.ckzp.jfinal.system.util;

import com.ckzp.jfinal.form.FormSelect;

/**
 * Created by 51594 on 2021/3/19.
 */
public class TestUtil {

    /**
     * 商品大类
     *
     * @return
     */
    public static FormSelect getTestType() {
        FormSelect fs = FormSelect.n().setSource("SELECT type_id as id,type_name as name FROM goods_type where status=1 order by sindex");
        fs.setReadOnly(true).setName("test_type").setCanNull(false);
        fs.setStyle("width:80px");
        return fs;
    }

    /**
     * 商品小类
     *
     * @return
     */
    public static FormSelect getTestTypeDetial(int typeid) {
        FormSelect fs = FormSelect.n().setSource("SELECT detail_id as id,detail_name as name FROM " +
                "goods_type_detail where type_id=" + typeid + " and status=1 order by sindex");
        fs.setReadOnly(true).setName("test_type2").setCanNull(false);
        fs.setStyle("width:80px");
        return fs;
    }
}
